<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
<second></second>
</div>

<script>
    let second = {
        template:`
         <div>
         这是局部组件
</div>
        `,
    }
    // Vue.component("second",second)
    new Vue({
        el: "#app",
        data: {},
        components:{
            "second":second,
        },
    })
</script>
</body>
</html>